package org.tech4j.edi.base.executor;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/7 20:38
 **/
public enum EdiExecutorsOrder {

    FIRST(Integer.MIN_VALUE),

    RETRY_CONTEXT,

    RETRY_FILTER,

    SELECT_DYNAMIC_THREAD_POOL,

    LAST(Integer.MAX_VALUE),

    ;

    private static final int INTERVAL = 100;
    private final int order;

    EdiExecutorsOrder(int order) {
        this.order = order;
    }

    EdiExecutorsOrder() {
        this.order = ordinal() * INTERVAL;
    }

    public int getOrder() {
        return order;
    }
}
